<div class="form-group">
    <label class="col-sm-2 control-label">用户名</label>
    <div class="col-sm-6">
        <input type="text" class="form-control" name="{{ form_name }}[username]" required="required" value="{{ entity.username }}">
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">密码</label>
    <div class="col-sm-6">
        <input type="text" class="form-control" name="{{ form_name }}[password]" required="required"

                {% if is_edit is not defined %}
                value="{{ entity.password }}">
                {% else %}
                value="">
                {% endif %}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">权限组</label>
    <div class="col-sm-6">
        <select class="form-control" name="{{ form_name }}[roleId]" required="required">
            <option value="0">--请选择--</option>

            {% for role in roleList %}
            <option value="{{ role.id }}"
                {% if entity.roleId == role.id %}
                    selected="selected">
                {% else %}
                    >
                {% endif %}
                    {{ role.rolename }}
            </option>

            {% endfor %}

        </select>
    </div>
</div>